<template>
  <div class="container">
    <data-view
      ref="childDataView"
      propViewKey="base_oprt"
      propViewForm="base/oprt/detail.vue"
      :propFlowKey="propFlowKey"
      :propShowToolBar="true"
      @extra-button-click="handelExtraButton"
      :propIsTdesign="true"
    />
  </div>
</template>

<script>

export default {
  name: 'oprt',
  data() {
    return {

    }
  },
  components: {

  },
  methods: {
    handelExtraButton(para) {
      const params = {addr: process.env.VUE_APP_BASE_API + 'webservice/SOAPMock?wsdl',
        methodName: 'getOprt',
        name: '获取手术信息',
        param: '无',
        msg: '请稍候',
        type: 'SOAP'}
      if (para.button.key === 'syncOprt') {
        this.$ajax.post('/his/get_oprt', params).then(resp => {
          this.utilMessage.success(resp.msg)
          this.$refs.childDataView.ocRefresh()
        })
      }
    }
  },
  props: ['propFlowKey'],
}
</script>
